package appapi.service.impl;

import appapi.dao.AreapathMapper;
import appapi.dao.DevicesMapper;
import appapi.entity.mqtt.Areapath;
import appapi.entity.mqtt.mqttvo.AreaVo;
import appapi.service.AreapathService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version: java version 1.8
 * @Author: Ygp Work
 * @description:
 * @date: 2023-07-07 10:18
 */
@Service
public class AreapathServiceImpl implements AreapathService {

    @Autowired
    private AreapathMapper areapathMapper;
    @Override
    public void insertAreapath(Areapath areapath) {
        areapathMapper.insertAreapath(areapath);
    }

    @Override
    public List<Areapath> getAll(Areapath areapath) {
        return areapathMapper.getAll(areapath);
    }

    @Override
    public List<AreaVo> getAreapathByid(Long Id) {
        return areapathMapper.getAllReserves(Id);
    }
}
